Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zlib-browserify

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zlib-browserify

Wrapper for zlib.js to allow for browserifyication

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25K
decreased by-54.97%
Maintainers
1
Weekly downloads
 
Created
Source

zlib-browserify Build Status

Zlib in yo' browser.

What is this?

This is a very small wrapper for https://github.com/imaya/zlib.js. Fixes some very minor API inconsistencies. Only implements inflate, deflate, gzip and gunzip so if you're doing anything extra fancy you're out of luck for now.

Run tests

$ npm test

Test methodology (a.k.a, "why doesn't the output match node's zlib?")

(zlibA = native, zlibB = browserified)

Pretending these are sync, I do the following to test:

assert(zlibB.inflate(zlibA.deflate('test')) === "test");
assert(zlibA.inflate(zlibB.deflate('test')) === "test");
...

and so on for each of the methods supported. Note, I do not do

assert(zlibA.deflate('test') === zlibB.deflate('test'));

Because node's deflate and the imaya's version do not seem to use the same defaults for compression level. I haven't figured out how to change it yet. Anyway, rest assured, while deflate does not return the same output, this is fully interoperable with node's native zlib.

License

MIT

Keywords

FAQs

Package last updated on 01 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc